package cn.xqj.user.controller;

import cn.xqj.user.service.ILogininfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletResponse;

@RestController
@RequestMapping("/logininfo")
public class LogininfoController {

    @Autowired
    private ILogininfoService logininfoServiceImpl;




    @GetMapping("/active/{id}")
    public void shopActive(@PathVariable("id") Long id, HttpServletResponse response) {
        try {
            logininfoServiceImpl.active(id);
            response.sendRedirect("http://localhost:8081/#/transition");
        } catch (Exception e) {
            e.printStackTrace();
        }


    }


}
